/*-- Handle Ajax --*/
function handleAjax(url,method,dataType,data,success,beforesend,error){
   if(url != ''){
      if (typeof(method) == 'undefined'){
         method = 'POST'
      }
      if(typeof(beforesend) == 'undefined'){
         beforesend = function(){};
      }
      if(typeof(error) == 'undefined'){
         error = function(){};
      }
      if(typeof(success) == 'undefined'){
         success = function(){};
      }
      $.ajax({
         url:url,
         type:method,
         dataType: dataType,
         data:data,
         beforeSend: beforesend,
         success:success,
         error:error, 
         
      });  
   }
}
function toggleClassByElement(className,elm){
   if($(elm).hassClass(className)){
      $(elm).removeClass(className);
   }else{
      $(elm).addClass(className);
   }
}
/*------- Toggle Module -------*/
function toggleModule(obj){
   __this = $(obj);
   parent = __this.parents('#wraper');
   if(parent.hasClass('_smn')){
      parent.removeClass('_smn');
   }else{
      parent.addClass('_smn');
   }
}
